$OpenBSD: patch-src_iperf_api_c,v 1.2 2016/09/22 02:13:18 lteo Exp $

Default to IPv4.

Missing initialization.

--- src/iperf_api.c.orig	Mon Jun  6 14:18:49 2016
+++ src/iperf_api.c	Sun Sep 18 01:51:24 2016
@@ -1839,7 +1839,7 @@ iperf_defaults(struct iperf_test *testp)
     testp->stats_interval = testp->reporter_interval = 1;
     testp->num_streams = 1;
 
-    testp->settings->domain = AF_UNSPEC;
+    testp->settings->domain = AF_INET;
     testp->settings->unit_format = 'a';
     testp->settings->socket_bufsize = 0;    /* use autotuning */
     testp->settings->blksize = DEFAULT_TCP_BLKSIZE;
@@ -2323,7 +2323,7 @@ iperf_print_results(struct iperf_test *test)
     struct iperf_stream *sp = NULL;
     iperf_size_t bytes_sent, total_sent = 0;
     iperf_size_t bytes_received, total_received = 0;
-    double start_time, end_time, avg_jitter = 0.0, lost_percent;
+    double start_time, end_time = 0.0, avg_jitter = 0.0, lost_percent;
     double bandwidth;
 
     /* print final summary for all intervals */
